﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBControl;
using System.Data;
using System.Data.SqlClient;

namespace SellerProject
{
    public partial class test : System.Web.UI.Page
    {
        string strgoodId;
        string uNick;
        string Gid;
        protected void Page_Load(object sender, EventArgs e)
        {
            //strgoodId = Session["selgoodId"].ToString();
            //uNick = Session["usNick"].ToString();

        }

        //protected void tbItemGet()
        //{
        //    string infomation = sellerInfo.Text;
        //    ItopInit iinit = new ItopInit();
        //    iinit.itemGet(Session["sessionKey"].ToString(), strgoodId, uNick);
        //    Gid = Request.QueryString["BinfoId"];

        //    SqlParameter[] sps = {new SqlParameter("@buyerid", Gid), 
        //                          new SqlParameter("@releasename",uNick),
        //                          new SqlParameter("@tradelink",iinit.itemgetres.Item.DetailUrl),
        //                          new SqlParameter("@infomation", infomation),
        //                          new SqlParameter("@piclink", iinit.itemgetres.Item.PicUrl),
        //                          new SqlParameter("@cate", iinit.itemgetres.Item.Cid),
        //                          new SqlParameter("@honor", iinit.itemgetres.Item.Score),
        //                          new SqlParameter("@price", iinit.itemgetres.Item.Price)};
        //    SqlDbHelper sdh = new SqlDbHelper();
        //    //num_iid,title,price,detail_url,type,pic_url,num,stuff_status,post_fee,express_fee,ems_fee,score,item_imgs.url

        //    try
        //    {
        //        sdh.ExecuteNonQuery("ChangeSellerInfoR", CommandType.StoredProcedure, sps);
        //        Response.Write("<script>alert('发布成功!');</script>");
        //    }
        //    catch(Exception err)
        //    {
        //        Response.Write(err.Message.ToString());
        //    }
        //    //Response.Write("<script type='text/javascript'>alert('发布成功!');setTimeout(function(){location.href='..ProjectX/detail.aspx?pid='" + Gid + "'},3000);</script>");

        //    //写入数据库需要的字段
        //    //Id 唯一码,
        //    //buyerid.Buyerinfo 主键唯一吗,
        //    //Releasename 卖家昵称
        //    //Tradelink 详细页面链接
        //    //Infomation 卖家写的信息
        //    //Piclink 图片链接
        //    //Cata 类目
        //    //Honor 信誉等级
        //    //Releasetime 发布时间
        //    //Money 价格
        //}

        protected void Button1_Click(object sender, EventArgs e)
        {
            //SqlDbHelper sdh = new SqlDbHelper();
            //SqlParameter sp = new SqlParameter("@numid","50005730");

            //DataTable dt = sdh.ExecuteDataTable("getGoodCid", CommandType.StoredProcedure, sp, null);

            //tbItemGet();

        }
    }
}